package com.walker.core;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class DataSourceConfig {
	
	@Bean(name = "dsDataSource")
    @Qualifier("dsDataSource")
	@Primary
    @ConfigurationProperties(prefix="spring.datasource.ds")
    public DataSource dolphinschedulerDataSource() {
        return DataSourceBuilder.create().build();
    }
}